<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/**
 * Product view template
 *
 * @see Mage_Catalog_Block_Product_View
 * @see Mage_Review_Block_Product_View
 */
?>
<?php
	$productCollection = Mage::getResourceModel('catalog/product_collection');
	$productCollection->addAttributeToSelect('small_image,name,url_path');
    $productCollection->addAttributeToFilter(array(array('attribute'=>'small_image','like'=>'/%')));
	//$productCollection->setPageSize(20);
	$productCollection->setCurPage(1)->load();
    $_helper = $this->helper('catalog/output');
?>

    <script type="text/javascript">
	  jQuery.noConflict();
      jQuery(document).ready(function() {
        jQuery("#carousel").featureCarousel({
          // include options like this:
          // (use quotes only for string values, and no trailing comma after last option)
          // option: value,
          // option: value
        });
      });
    </script>
<div id="carousel-container">
    
      <div id="carousel">
	  	<?php foreach ($productCollection as $_product):?>
        <div class="carousel-feature">
          <a href="<?php echo $_product->getProductUrl();?>"><img class="carousel-image" alt="Image Caption" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image');?>"></a>
          <div class="carousel-caption">
            <p>
              <?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true);?>
            </p>
          </div>
        </div>
        <?php endforeach; ?>
      </div>
    
      <div id="carousel-left"><img src="<?php echo $this->getSkinUrl('css/jtee/left.png') ?>" /></div>
      <div id="carousel-right"><img src="<?php echo $this->getSkinUrl('css/jtee/right.png') ?>" /></div>
    </div>